<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"> 
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>捷豹英仕挑战赛</title> 
    <link rel="stylesheet" href="/Public/Home/css/font.css" />
    <link rel="stylesheet" href="/Public/Home/css/reg.css" />
    <script type="text/javascript" src="/Public/Home/js/jquery.min.js"></script> 
    <script type="text/javascript" src="/Public/Home/js/jquery.form.js"></script> 
	<script src="/Public/Home/js/adaptUILayout.js"></script> 
	<script language="javascript">
		adaptUILayout.adapt(640);
	</script> 
<style type="text/css">
.radiobox{ background-color:rgba(255,255,255,0.3); border-radius:8px; height:2em; line-height:2em; display:inline-block; overflow: hidden; }
.radiobox u{ display:inline-block; padding:0px 1em; text-decoration: none; }
u.chkd{ background-color:rgba(0,0,0,0.9); }
</style>
</head>
<body> 
<div id="body">
	<div id="bg"></div>
	<div class="formbox"> 
	<form id="AjaxForm" >
		<table>
			<tr>
				<th colspan="2" class="phead"><h2>捷豹“英仕挑战赛”在线报名</h2></th>
			</tr>
			<tr>
				<td colspan="2">
					<p>驭豹名额有限，请即刻报名抢先获享，能否出席活动请以电话邀约为准。<br />
捷豹中国在此承诺：您在网站上提供的个人信息不会出售给任何第三方。您的资讯可能被捷豹中国及经销商用作分析研究，提供您所需要的服务，以及新产品和服务的信息，以便改善我们的服务。(*为必填项)</p>
				</td>
			</tr>
			<tr>
				<th>姓名<i>*</i></th><td><input type="text" id="username" name="username" placeholder="请输入姓名" /></td>
			</tr> 
			<tr>
				<th>性别<i>*</i></th><td><label><input name="sex" checked="checked" value="先生" type="radio" />先生</label><label><input name="sex" value="女士"  type="radio" />女士</label></td>
			</tr> 
			<tr>
				<th>手机号码<i>*</i></th><td><input type="text" id="phone" name="phone" placeholder="请输入手机号码" /></td>
			</tr> 
			<tr>
				<th>电子邮箱<i>*</i></th><td><input type="text" id="email" name="email" placeholder="请输入电子邮箱" /></td>
			</tr> 
			<tr>
				<th>活动城市<i>*</i></th><td><select id="city" name="city">
					<option>请选择...</option>
<foreach name="activelist" item="vo" ><option value='{$vo.city}'>{$vo.city}</option></foreach>
				</select></td>
			</tr> 
			<tr>
				<th>活动日期<i>*</i></th><td id="timbox"><select id="act_time" name="act_time">
					<option>请选择...</option>
				</select></td>
			</tr> 
			<tr>
				<th>参与活动场次<i>*</i></th><td><select id="act_index" name="act_index">
					<option>请选择...</option>
					<option value='9:30~12:00'>9:30~12:00</option>
					<option value='13:00~15:30'>13:00~15:30</option>
					<option value='15:30~18:00'>15:30~18:00</option>
				</select></td>
			</tr> 
			<tr>
				<th>感兴趣的车型<i>*</i></th><td><select id="cartype" name="cartype">
					<option>请选择...</option>
					<option value='F-PACE'>F-PACE</option>
					<option value='F-TYPE'>F-TYPE</option>
					<option value='XE'>XE</option>
					<option value='XJ'>XJ</option>
					<option value='XF'>XF</option>
					<option value='XFL'>XFL</option>
				</select></td>
			</tr> 
			<tr>
				<th>意向购车时间<i>*</i></th><td><select id="buy_time" name="buy_time">
					<option>请选择...</option>
					<option value='0~3个月'>0~3个月</option>
					<option value='4~6个月'>4~6个月</option>
					<option value='7~12个月'>7~12个月</option>
					<option value='一年以上'>一年以上</option>
					<option value='暂无购车计划'>暂无购车计划</option>
				</select></td>
			</tr> 
			
			<tr>
				<th colspan="2">您是由何种渠道邀约参与捷豹英仕挑战赛的？</th>
			</tr> 
			<tr>
				<td colspan="2">
					<label><input name="comefrom" value="捷豹中国" type="radio" required="required"/>捷豹中国</label>
					<label><input name="comefrom" value="捷豹经销商" type="radio"  required="required"/>捷豹经销商</label>
					<label><input name="comefrom" value="汽车媒体" type="radio"  required="required"/>汽车媒体</label>
				</td>
			</tr> 
			<tr>
				<td colspan="2">
					<p id="xy" style="padding-left: 30px;"><input id="tk" type="checkbox" checked="checked" class="chk" style="margin-left: -30px; margin-top: 3px;" />同意：我特此授权捷豹中国保留我的数据以便解答我的问题；我所提供的信息按照数据保护规定进行保留。我同意捷豹中国把我的数据用于营销、调查和统计目的，并允许捷豹中国根据我所提供的信息与我联系。</p>
				</td>
			</tr> 
		</table>
		<center style="padding-bottom: 30px"><a href="javascript:void(0)" id="regBtn">注册</a></center>
	</form>
	</div>
</div> 
<script language="javascript">
$(function(){ 
	$('#xy').click(function(){
		$('#tk').prop('checked',!$('#tk').prop('checked'));
	});
	$('#city').change(function(){
		$.getJSON('/index.php/Home/Jaguar/getTime/city/'+$(this).val(),function(obj){
			var html = '<select id="act_time" name="act_time"><option>请选择...</option>';
			$.each(obj.d,function(ii,dd){
				html += '<option value="'+dd+'">'+dd+'</option>';
			});
			html += '</select>';
			$('#timbox').html(html);
		});
	}); 
	$('#regBtn').click(function(){ 
		if($('#username').val().length<1){ alert('请输入姓名'); return false; }
		if($('#phone').val().length<1){ alert('请输入手机号码'); return false; }
		if($('#email').val().length<1){ alert('请输入邮箱'); return false; }
		if($('#city').val().length<1){ alert('请选择活动城市'); return false; }
		$cp=$('input:radio[name="comefrom"]:checked').val();
		if($cp==null){ alert('请选择渠道'); return false; }
		var options = {
			url: '/index.php/Home/Jaguar/saveReg/',
			type: 'post',
			dataType: 'json',
			success: function (d) { 
				if(d.s==1){
					alert(d.m);
					location.href = '/index.php/Home/Jaguar/check/';
				}
				if(d.s){
					
					location.href = '/index.php/Home/Jaguar/check/';
				}
			}
		};
		$('#AjaxForm').ajaxSubmit(options);
	});
});
</script>
</body>
</html>